package com.zhilianbao.leyaogo.model.response.Coupon;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Author: hcy
 * Description:
 * Created: 2016/11/30 19:14
 */
public class CouponGood implements Parcelable{
    private long couponsGoodsId;//(integer, optional): 主键 优惠券关联商品编号 ,
    private long couponsId;// (integer, optional): 所属优惠券 ,
    private  long goodsId;// (integer, optional): 优惠券对应商品编号 ,
    private long goodsSkuId;// (integer, optional): 优惠券对应的SKU商品编号 0 对应SPU商品 ,
    private int sortIndex;// (integer, optional): 排序 ,
    private String comments;// (string, optional): 备注

    protected CouponGood(Parcel in) {
        couponsGoodsId = in.readLong();
        couponsId = in.readLong();
        goodsId = in.readLong();
        goodsSkuId = in.readLong();
        sortIndex = in.readInt();
        comments = in.readString();
    }

    public static final Creator<CouponGood> CREATOR = new Creator<CouponGood>() {
        @Override
        public CouponGood createFromParcel(Parcel in) {
            return new CouponGood(in);
        }

        @Override
        public CouponGood[] newArray(int size) {
            return new CouponGood[size];
        }
    };

    public long getCouponsGoodsId() {
        return couponsGoodsId;
    }

    public void setCouponsGoodsId(long couponsGoodsId) {
        this.couponsGoodsId = couponsGoodsId;
    }

    public long getCouponsId() {
        return couponsId;
    }

    public void setCouponsId(long couponsId) {
        this.couponsId = couponsId;
    }

    public long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(long goodsId) {
        this.goodsId = goodsId;
    }

    public long getGoodsSkuId() {
        return goodsSkuId;
    }

    public void setGoodsSkuId(long goodsSkuId) {
        this.goodsSkuId = goodsSkuId;
    }

    public int getSortIndex() {
        return sortIndex;
    }

    public void setSortIndex(int sortIndex) {
        this.sortIndex = sortIndex;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(couponsGoodsId);
        dest.writeLong(couponsId);
        dest.writeLong(goodsId);
        dest.writeLong(goodsSkuId);
        dest.writeInt(sortIndex);
        dest.writeString(comments);
    }
}
